package com.hongtech.modules.system.service.impl;

import com.hongtech.common.service.impl.CrudServiceImpl;
import com.hongtech.modules.system.dto.SysLogDTO;
import com.hongtech.modules.system.entity.SysLogEntity;
import com.hongtech.modules.system.mapper.SysLogMapper;
import com.hongtech.modules.system.service.SysLogService;
import java.util.Date;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

/**
 * SysLog 表数据服务层接口实现类
 */
@Service
public class SysLogServiceImpl extends CrudServiceImpl<SysLogMapper, SysLogEntity, SysLogDTO>
        implements SysLogService {

    public static final Logger logger = Logger.getLogger(SysLogServiceImpl.class);

    @Override
    public void insertLog(String title, String uname, String url, String parms) {
        SysLogDTO sysLogDTO = new SysLogDTO();
        sysLogDTO.setTitle(title);
        sysLogDTO.setUserName(uname);
        sysLogDTO.setUrl(url);
        sysLogDTO.setParams(parms);
        this.add(sysLogDTO);
        logger.debug("记录日志:" + sysLogDTO.toString());
    }

}
